/* -------------------------------------------------------------------------------------------------
** General Body Styles
** -----------------------------------------------------------------------------------------------*/

body {
    font-family: sans-serif;
}

.md a {
    font-family: sans-serif;
}


/* -------------------------------------------------------------------------------------------------
** Table of Contents
** -----------------------------------------------------------------------------------------------*/

.md .longTOC, .md .mediumTOC, .md .shortTOC {
    font-family: sans-serif;
}

.md .longTOC {
    width: 72%;
    margin: 2em auto 0 auto;
    padding: 0 4ex 1em 4ex;
    border: solid 4px #e0e0d0;
    background: #e4e4d8;
}

.md .tocHeader {
    font-size: 165%;
    margin-bottom: -1em;
    border-bottom: solid 4px #777;
}

.md .longTOC, .md .mediumTOC, .md .shortTOC {
    font-family: sans-serif;
}


/* -------------------------------------------------------------------------------------------------
** Titles & Headers
** -----------------------------------------------------------------------------------------------*/

.md div.title {
    font-size: 220%;
    letter-spacing: -0.06em;
}

.md .subtitle {
    font-size: 100%;
    font-style: italic;
}

.md h1 {
    font-size: 165%;
    letter-spacing: -0.05ex;
    margin-top: 2em;
    padding-top: 0.25em;
    border-bottom: solid 4px #777;
    text-align: left;
}

.md h1::before {
    content: counter(h1) ". ";
}

.md h2::before {
    content: counter(h1) "." counter(h2) ". ";
}


/* -------------------------------------------------------------------------------------------------
** Code
** -----------------------------------------------------------------------------------------------*/

.md code {
    font-family: Consolas, Menlo, monospace;
    color: #000;
}

.md p code {
    padding: 0 .4ex;
    background: #e4e4e0;
}

.md pre.listing.tilde {
    border: solid 3px #d4d4d4;
    background: #e4e4e0;
    margin-left: 3ex;
    padding: 1.5ex;
    width: 94%;
}

.md pre.listing.tilde code {
    font-size: 86%;
    margin-left: 0;
}

/* Hilight.js Syntax Coloring */

.hljs-comment {
    color: #40f;
}

.hljs-keyword {
    color: #a62;
}

.hljs-meta {
    color: #f40;
}

.hljs-title {
    font-weight: bold;
}

.hljs-number {
    color: #009944;
}

/* Code Line Types */

.md code > .highlight {
    background-color: #ccdbc8;
}

.md code > .delete {
    text-decoration: line-through;
    background-color: #ffcccc;
    color: #a0a0a0;
}

/* -------------------------------------------------------------------------------------------------
** Images & Figures
** -----------------------------------------------------------------------------------------------*/

.md img {
    margin-top: 1.0em;
    width: 72ex;
}

.md div.imagecaption {
    text-align: center;
    margin-bottom: 1em;
}


/* -------------------------------------------------------------------------------------------------
** Print Styling
** -----------------------------------------------------------------------------------------------*/

@media print {

    @page {
        margin: 1.5cm 2.5cm 1.0cm 2.5cm;
        size: letter portrait;
    }

    body {
        line-height: 110%;
    }

    div.together {
        page-break-inside: avoid;
    }

    .md {
        font-size: 80%;
    }

    .md h1 {
        page-break-before: always;
    }

    .md img {
        page-break-before: avoid;
    }

    .md code {
        font-size: 86%;
    }

    .md p code {
        padding: 0;
        color: #b63;
        background: none;
    }

    .md pre.listing.tilde {
        margin: 0 auto;
        width: 86%;
    }

    .md pre.listing.tilde code {
        font-size: 65%;
    }
}
